<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>仪器配件信息</title>

		<jsp:include page="../common/xmeta.jsp"></jsp:include>
		<script type="text/javascript" src="../js/plugins/jquery.tablesorter.min.js"></script>
		<script type="text/javascript" src="js/apparatusconfig.js" charset="UTF-8"></script>
	</head>

	<body>
		<br>
		<div>
			<a id="add" href="#" class="easyui-linkbutton" iconCls="icon-add" onclick="addConfigs(<s:property value="appCode" />);"
				style="float: right"> 添加 </a>
		</div>
	
		<center>
			<b>${apparatusVo.name}</b>
		</center>
		<br>
		<table width="100%" class="easyui-datagrid" fitColumns="true">
			<thead>
				<tr>
					<th width="13%" field="标题">
						标题
					</th>
					<th width="10%" field="资料来源">
						资料来源
					</th>
					<th width="12%" field="上传时间">
						上传时间
					</th>
					<th width="25%" field="概述">
						概述
					</th>
					<th width="10%" field="附件">
						附件
					</th>
					<th width="7%" field="下载次数">
						下载次数
					</th>
					<th width="10%" field="信息类型">
						信息类型
					</th>
					<th width="25%" field="操作">
						操作
					</th>
				</tr>
			</thead>

			<tbody>
				<s:iterator value="configs" status="st">
					<tr>
						<td>
							<s:property value="title" />
						</td>
						<td>
							<s:property value="origin" />
						</td>
						<td>
							<s:property value="uploadTime" />
						</td>
						<td>
							<s:property value="introduction" />
						</td>
						<td>
							<a href="download.action?id=<s:property value="id" />"><s:property value="attachment" />
							</a>
						</td>
						<td>
							<s:property value="downLoadCount" />
						</td>

						<td>
							<s:if test="type == 8">送样信息</s:if>
							<s:elseif test="type == 7">科研成果表</s:elseif>
							<s:elseif test="type == 6">心得和案例</s:elseif>
							<s:elseif test="type == 5">仪器培训信息</s:elseif>
							<s:elseif test="type == 4">仪器功能</s:elseif>
							<s:elseif test="type == 3">仪器材料管理</s:elseif>
							<s:elseif test="type == 2">仪器配件管理</s:elseif>
							<s:elseif test="type == 1">维护和维修管理</s:elseif>
							<s:else>？</s:else>
						</td>

						<td>
							<!-- 
							<input type="button" value="编辑" class=".btn" onclick="deleteConfig(<s:property value="id" />)">&nbsp;
							 -->
							
							<input type="button" value="删除" class=".btn" onclick="deleteConfig(<s:property value="id" />)">
						</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
	</body>
</html>
